package br.com.jmed.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the paciente_convenio database table.
 * 
 */
@Embeddable
public class PacienteConvenioPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private Integer paciente;

	private Integer convenio;

    public PacienteConvenioPK() {
    }
	public Integer getPaciente() {
		return this.paciente;
	}
	public void setPaciente(Integer paciente) {
		this.paciente = paciente;
	}
	public Integer getConvenio() {
		return this.convenio;
	}
	public void setConvenio(Integer convenio) {
		this.convenio = convenio;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PacienteConvenioPK)) {
			return false;
		}
		PacienteConvenioPK castOther = (PacienteConvenioPK)other;
		return 
			this.paciente.equals(castOther.paciente)
			&& this.convenio.equals(castOther.convenio);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.paciente.hashCode();
		hash = hash * prime + this.convenio.hashCode();
		
		return hash;
    }
}